package com.teame.readbaby.parser;

import java.util.List;

import org.json.JSONException;

import com.alibaba.fastjson.JSONObject;
import com.teame.readbaby.vo.AddressListInfo;
import com.teame.readbaby.vo.CheckOutAddressInfo;

public class AddressListParser extends BaseParser<List<AddressListInfo>> {

	@Override
	public List<AddressListInfo> parseJSON(String paramString) throws JSONException {
		String result = checkResponse(paramString);
		if (result == null) {
			return null;
		}

		JSONObject jsonObject = JSONObject.parseObject(paramString);
		String jsonAddressList = jsonObject.getString("addresslist");
		List<AddressListInfo> addressList = JSONObject.parseArray(jsonAddressList, AddressListInfo.class);
		return addressList;
	}

}
